module.exports = {
  schedule: {
    cron: '0 2 12 * * ?',
    type: 'worker',
    env: ['no'],
//    immediate: true
  },

  async task(ctx) {
    const loginname = '囧哥说事';
    const tab = 'yutang';
    let topics = await ctx.service.commonSvc.commonWeixinApi(loginname, tab);
    let count = await ctx.service.topicSvc.importTopics(topics);
    ctx.logger.info(`weixin ready ${loginname} ${topics.length} success ${count}`);
  },
};
